{% load static %}
<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>健身房管理系统</title>
    <link rel="stylesheet" href="{% static 'css/input_text.css'%}">
    <link rel="shortcut icon" href="/static/favicon.ico" type="image/x-icon">
</head>

<style>
    .form-container {
        display: flex; /* 使用flex布局 */
        margin: 0;
        display: flex;
        justify-content: center;
        align-items: center;
    }

</style>

<style>
    .background{
        flex:1;
    background-image: url('/static/background.jpg');
    background-size: cover;
    background-position: center;
    background-attachment: fixed;
    margin: 0;
    padding: 0;
    height: 100vh;
    width: 100vw;
    overflow-y: hidden;
    overflow-x: hidden;
    flex-direction: column;
}
</style>

<style>
    .gradient-text {
        font-size: 50px; /* 设置字体大小 */
        background: linear-gradient(to right, #52E5E7, #130cb7); /* 定义从左到右的红蓝渐变 */
        -webkit-background-clip: text; /* 将背景应用到文本 */
        background-clip: text;
        color: transparent; /*设置文本颜色为透明，以显示背景渐变 */
        font-weight: bold;
        /* display: inline-block; */
    }
  </style>

<style>
    table {
        /* margin-left: auto;
        margin-right: auto; */
        width: 75%;
        border-collapse: collapse;
        margin: 0 auto;
        font-size: 0.9em;
        font-family: sans-serif;
        min-width: 400px;
        box-shadow: 0 0 20px rgba(0, 0, 0, 0.15);
    }
    thead tr {
        background-color: #009879;
        color: #ffffff;
        text-align: left;
    }
    th,td {
        
        padding: 12px 15px;
    }
    tbody tr {
        border-bottom: 1px solid #0cc3c6;
    }
    tbody tr:nth-of-type(even) {
        background-color: #9be0f5;
    }
    tbody tr:nth-of-type(odd){
        background-color: #45c7ef;
    }
    tbody tr:last-of-type {
        border-bottom: 2px solid #009879;
    }
    tbody tr.active-row {
        font-weight: bold;
        color: #009879;
    }
</style>


<body>  
    <div class="background">
        <div class="audio-control">
            <button id="playPauseBtn" class="audio-btn">
                <svg viewBox="0 0 24 24">
                    <path d="M12 3C7.7 3 3.7 4.4 0 7.7V16.3C3.7 19.6 7.7 21 12 21C16.3 21 20.3 19.6 24 16.3V7.7C20.3 4.4 16.3 3 12 3ZM12 19C8.1 19 4.7 17.5 2 15.1V8.9C4.7 6.5 8.1 5 12 5C15.9 5 19.3 6.5 22 8.9V15.1C19.3 17.5 15.9 19 12 19ZM12 17C13.7 17 15 15.7 15 14C15 12.3 13.7 11 12 11C10.3 11 9 12.3 9 14C9 15.7 10.3 17 12 17Z"></path>
                </svg>
            </button>
        </div>
        <audio id="audio" src="/static/music.mp3" preload="auto"></audio>
        <script>
            document.addEventListener('DOMContentLoaded', function() {
                var playPauseBtn = document.getElementById('playPauseBtn');
                var audio = document.getElementById('audio');
                audio.play();
                playPauseBtn.querySelector('svg').style.fill = '#4CAF50';
                playPauseBtn.addEventListener('click', function() {
                    if (audio.paused) {
                        audio.play();
                        playPauseBtn.querySelector('svg').style.fill = '#4CAF50'; // Change color to indicate playing
                    } else {
                        audio.pause();
                        playPauseBtn.querySelector('svg').style.fill = '#333'; // Reset color
                    }
                });
            });
        </script>
        <h1 class="gradient-text" style = "text-align: center;" >
            健身课程
        </h1>
        <form action="" method="get" class='form-container'> 
            <input type="hidden" name="account" value="{{ account }}">
            <input type="hidden" name="password" value="{{ password }}">  
            <input type="hidden" name="option" value="教练">  
            <input type="text" name="course_name" placeholder="课程名称" required>
            <input type="text" name="time" placeholder="时间" required>
            <input type="text" name="location" placeholder="地点" required>
            <!-- 其他需要的字段 -->
            <input type="submit"value="添加">
        </form>
        
    </div>
    
</body>
</html>